#ifndef __SERVER_H__
#define __SERVER_H__



/**  Constants  **/
static const char* _SERVER_ = "server";
static const char* SERVER_FILE = "account.txt";
static const int MAX_BALANCE= 100000;
static const int MIN_BALANCE= 0;
static const int MAX_PENDING= 500;

/**  Variables **/
struct sockaddr_in * servSock;
static int _isFileInUse;
int socketdescriptor;   //  Listener descriptor
int isServerRunning;


/**  Function Prototypes */
int createServerSocket();
int bindServerSocket();
int setSocketToListen();
int startServer();
void processMessage(struct atm_msg* msg);


int update_account(struct atm_msg* msg);
int setFileInUse(int inUse);
int isFileInUse();



#endif /* __SERVER_H__ */
